package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.templates.RobotMap;

/**
 *
 * @author Super NURDs
 */

public class HumanFeeder extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.

    Solenoid deployHumanFeederSolenoid;
    Solenoid retractHumanFeederSolenoid;
    
    public String humanFeederPosition = "";
    public boolean humanFeederDeployed;
        
    public HumanFeeder(){
        super("HumanFeeder");        
        try {
            deployHumanFeederSolenoid = new Solenoid(RobotMap.HUMAN_FEEDER_DEPLOY_SOLENOID);
            retractHumanFeederSolenoid = new Solenoid(RobotMap.HUMAN_FEEDER_RETRACT_SOLENOID);
        }
        catch (Exception e){
            e.printStackTrace();
        }
    }
    public void initDefaultCommand() {
    }    
    
    public void deployHumanFeeder() {
        deployHumanFeederSolenoid.set(true);
        retractHumanFeederSolenoid.set(false);
        humanFeederDeployed = true;
    }
    
    public void retractHumanFeeder() {
        retractHumanFeederSolenoid.set(true);
        deployHumanFeederSolenoid.set(false);
        humanFeederDeployed = false;
    }
    
    public boolean isHumanFeederDeployed() {
        return humanFeederDeployed;
    }
 }